<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>币情分析报告</title>

    <script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
    <script src="https://cdn.bootcss.com/echarts/4.1.0.rc2/echarts.min.js"></script>
    <script src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
</head>

<body class="yahei">

<div id="titleView">
    <img src="https://199store.oss-cn-hangzhou.aliyuncs.com/f0f2caddf433420fb26ffeea42e22d23.png" style="width: 100%; height: auto;">
    <div id="titleBgView">
        <p></p>
    </div>
</div>

<div class="center p_t_10 font_18 theme_color line_h_35">币的基本面介绍</div>

<div id="baseInfoView" class="center_95">
    <div id="baseInfoTitle" class="gradient">
        <img id="coinLogo" src="https://199store.oss-cn-hangzhou.aliyuncs.com/5cbf1c0a913948cfa80843324934cfc8.png">
        <p id="coinName"></p>

        <div id="coinPrice">
            <p id="priceCny"></p>
            <p id="priceUsd"></p>
        </div>
    </div>

    <div id="baseInfoContent" class="box center_100">
        <div id="baseLeft">
            <div class="baseTip baseTip1">过去1H</div>
            <div id="oneHour" class="baseNum"></div>
            <br>
            <div class="baseTip baseTip2">过去24H</div>
            <div id="oneDay" class="baseNum"></div>
            <br>
            <div class="baseTip baseTip3">过去一周</div>
            <div id="oneWeek" class="baseNum"></div>
        </div>

        <div id="baseMid">
            <div class="baseTip">24小时成交量</div>
            <div id="oneDayTrade" class="baseNum"></div>
            <div id="oneDayTradeChange" class="baseNum"></div>
            <br>
            <br>
            <span class="baseTip">市值</span>
            <span id="coinRankNum"></span>
            <div id="marketVal" class="baseNum"></div>
        </div>

        <div id="baseRight">
            <div class="baseTip">当前代币</div>
            <div id="curCoinVal" class="baseNum"></div>
            <br>
            <div class="baseTip">总发行代币</div>
            <div id="totalCoinVal" class="baseNum"></div>
            <br>
            <div class="baseTip">上线日期</div>
            <div id="onelineDate" class="baseNum"></div>
        </div>
    </div>
</div>

<div class="center p_t_10 font_18 theme_color line_h_35">币的AI涨跌预测</div>

<div id="trendInfoView" class="center_95">
    <div id="trendInfoTitle" class="gradient box">
        <div id="trendLeft">
            <div id="pieView" style="width: 1.875rem; height: 1.875rem"></div>
        </div>
        <div id="trendMid">
            <div id="upRate" class="trendNum">&uarr;
                <a href="javascript:subscribeAction()">订阅可见</a>% 涨
            </div>
            <div id="downRate" class="trendNum">&darr;
                <a href="javascript:subscribeAction()">订阅可见</a>% 跌
            </div>
        </div>
        <div id="trendRight">
            <div id="lowLevel" class="trendNum">压力位
                <a href="javascript:subscribeAction()">订阅可见</a>
            </div>
            <div id="upperLevel" class="trendNum">支撑位
                <a href="javascript:subscribeAction()">订阅可见</a>
            </div>
        </div>
    </div>

    <div id="trendInfoContent">
        <div id="chartView" style="margin: 0 auto; width: 100%; height:200px;"></div>
    </div>
</div>

<div class="center p_t_10 font_18 theme_color line_h_35">大数据深度分析</div>

<div id="sixIndexInfoView" class="center_95">
    <div id="indexInfoTitle" class="gradient box">
        <div id="indexLeft">
            <div class="indexTitle">综合</div>
            <div class="indexNum"></div>
        </div>
        <div id="indexMid">
            <div class="indexTitle">排名</div>
            <div class="indexNum"></div>
        </div>
        <div id="indexRight">
            <div class="indexTitle">击败率</div>
            <div class="indexNum"></div>
        </div>
    </div>

    <div id="indexInfoContent">
        <div id="radarView" style="margin: 0 auto; width: 90%; height:300px;"></div>

        <div id="indexDescView">
            <div class="row">
                <div class="box">
                    <div id="supplyTitle" class="indexDescTitle">供给指数</div>
                    <div id="supplyNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">总发行代币数、流通代币数、挖币难易程度、币分发速度等46纬指数</div>
            </div>

            <div class="row">
                <div class="box">
                    <div id="needTitle" class="indexDescTitle">需求指数</div>
                    <div id="needNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">搜索指数、成交量、买单、主页UV、社区活跃指数等87纬指数</div>
            </div>

            <div class="row">
                <div class="box">
                    <div id="propTitle" class="indexDescTitle">属性指数</div>
                    <div id="propNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">项目类型、团队情况、代码指数、上线时间、上交易所等157纬指数</div>
            </div>

            <div class="row">
                <div class="box">
                    <div id="moodTitle" class="indexDescTitle">情绪指数</div>
                    <div id="moodNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">社区指数、主页UV、搜索指数、算率等的增长率等32纬指数</div>
            </div>

            <div class="row">
                <div class="box">
                    <div id="safeTitle" class="indexDescTitle">安全指数</div>
                    <div id="safeNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">代码安全、Token分散度、交易所波动、算法安全等52纬指数</div>
            </div>

            <div class="row">
                <div class="box">
                    <div id="futureTitle" class="indexDescTitle">未来指数</div>
                    <div id="futureNum" class="indexDescChange">（相比昨天涨跌率：
                        <a href="javascript:subscribeAction()">订阅可见</a>）
                    </div>
                </div>
                <div class="indexDesc">投资机构、社会价值、团队知名度、模式创新、应用指数等27纬指数</div>
            </div>
        </div>

    </div>
</div>

<div id="starTemplete" style="display: none">
    <img src="https://199store.oss-cn-hangzhou.aliyuncs.com/acd13b6d569d44bdaa3d464ab2d3450d.png" style="width: 20px; height: 20px;">
</div>

<div class="center p_t_10 font_18 theme_color line_h_35">今日推荐TOP5</div>

<div id="top5InfoView">
    <div id="row1" class="top5Row">
        <div class="starView"></div>

        <div class="box">
            <img id="top1Icon" class="top5RankIcon" src="https://199store.oss-cn-hangzhou.aliyuncs.com/a1405ddaf159465b91ed9f5bcc9dbdd6.png"
                 style="width: 1.3125rem; height: 1.5625rem;">

            <a class="topCoinName" href=""></a>
        </div>
    </div>

    <div id="row2" class="top5Row">
        <div class="starView"></div>

        <div class="box">
            <img id="top2Icon" class="top5RankIcon" src="https://199store.oss-cn-hangzhou.aliyuncs.com/601c50c4b987428092faec33723d9eca.png"
                 style="width: 1.3125rem; height: 1.5625rem;">

            <a class="topCoinName" href=""></a>
        </div>
    </div>

    <div id="row3" class="top5Row">
        <div class="starView"></div>

        <div class="box">
            <img id="top3Icon" class="top5RankIcon" src="https://199store.oss-cn-hangzhou.aliyuncs.com/5c3a35c08cb64be497fd7f6be1de569a.png"
                 style="width: 1.3125rem; height: 1.5625rem;">

            <a class="topCoinName" href=""></a>
        </div>
    </div>

    <div id="row4" class="top5Row">
        <div class="starView"></div>

        <div class="box">
            <div class="top5RankNum" style="width: 1.3125rem; height: 1.5625rem;">4</div>

            <a class="topCoinName" href=""></a>
        </div>
    </div>

    <div id="row5" class="top5Row">
        <div class="starView"></div>

        <div class="box">
            <div class="top5RankNum" style="width: 1.3125rem; height: 1.5625rem;">5</div>

            <a class="topCoinName" href=""></a>
        </div>
    </div>

    <div id="moreCoinBtn" onclick="subscribeAction()">订阅查看更多2个推荐</div>
</div>

<div id="newsTemplete" style="display: none">
    <div class="newsCell p_10">
        <div class="">
            <img class="newsImg" width="100%" src="">
        </div>
        <div class="">
            <a class="newsTitle" class="font_14" href=""></a>
            <span class="newsAdvantage">利好</span>
            <span class="newsDisadvantage">利空</span>
            <p class="newsContent"></p>
            <div class="p_t_10">
                <div class="optiView">
                    <img src="https://199store.oss-cn-hangzhou.aliyuncs.com/961e26e8af0d4787816c1e78c358fdb0.png" alt="">
                    <span class="optiTitle">利好：</span>
                    <span class="optiNum"></span>
                </div>
                <div class="pessiView">
                    <img src="https://199store.oss-cn-hangzhou.aliyuncs.com/6efb5c6eede54cd2bbd92ea659d0ad14.png" alt="">
                    <span class="pessiTitle">利空：</span>
                    <span class="pessiNum"></span>
                </div>
            </div>
        </div>
    </div>

    <div id="moreNewsBtn" onclick="subscribeAction()">订阅获取更多3条+精选舆情</div>
</div>

<div class="center p_t_10 font_18 theme_color line_h_35">当日精选舆情</div>

<div id="newsInfoView" class="center_95"></div>

<div class="center p_t_10 font_18 theme_color line_h_35">订阅入口</div>

<div id="purchaseEntranceView" class="center_95">
    <img src="https://199store.oss-cn-hangzhou.aliyuncs.com/33cd457b3ff84134a87070dbad6ef0a6.jpg" style="width: 100%; height: auto;">
    <img id="qrcodeView" src="">
</div>

<script>
    var coinWholeData=%s1;
    var isAlreadySubscribe = false;

    var coinLogoPlaceholder = "https://199store.oss-cn-hangzhou.aliyuncs.com/5cbf1c0a913948cfa80843324934cfc8.png";
    var pageBaseUrl = "https://www.valuechain.group/template/index.html?bccId={BCC_ID}T{REPORT_DATE}";

    function date2String(d, type) {
        if (d == null) {
            d = new Date()
        }

        var dateObj = d,
            year = dateObj.getFullYear(),
            month = '' + (dateObj.getMonth() + 1);
        var date = '' + dateObj.getDate();
        month.length === 1 && (month = 0 + month);
        date.length === 1 && (date = 0 + date);
        var hours = '' + dateObj.getHours();
        hours.length === 1 && (hours = 0 + hours);
        var mintues = '' + dateObj.getMinutes();
        mintues.length === 1 && (mintues = 0 + mintues);
        var seconds = '' + dateObj.getSeconds();
        seconds.length === 1 && (seconds = 0 + seconds);
        var dateStr = '';

        if ('NORMAL' === type) {
            dateStr = year + '-' + month + '-' + date + ' ' + hours + ':' + mintues;
        } else if ('SECONDS' == type) {
            dateStr = year + '-' + month + '-' + date + ' ' + hours + ':' + mintues + ':' + seconds;
        } else if ('DAY' == type) {
            dateStr = year + '-' + month + '-' + date;
        } else if ('YMD' == type) {
            dateStr = year + '-' + month + '-' + date;
        } else if ('MDHMS' == type) {
            dateStr = month + '-' + date + ' ' + hours + ':' + mintues + ':' + seconds;
        } else if ('NOTHING' == type) {
            dateStr = year + month + date;
        } else if ('MDH' == type) {
            dateStr = month + '/' + date + '/' + hours;
        } else if ('MD' == type) {
            dateStr = month + '/' + date;
        } else if ('HM' == type) {
            dateStr = hours + ':' + mintues;
        } else {
            dateStr = year + '-' + month + '-' + date + ' ' + hours + ':' + mintues;
        }
        return dateStr;
    }

    function reportTitleInfo(dailyInfo) {
        let monthValue;
        let dayOfMonth;
        let nameCn;
        let nameEn;

        if (dailyInfo.createReportTime.monthValue) {
            monthValue = dailyInfo.createReportTime.monthValue;
        } else {
            monthValue = dailyInfo.createReportTime.split('-')[1];
        }

        if (dailyInfo.createReportTime.dayOfMonth) {
            dayOfMonth = dailyInfo.createReportTime.dayOfMonth;
        } else {
            dayOfMonth = dailyInfo.createReportTime.split('-')[2];
        }

        if (dailyInfo.nameCn) {
            nameCn = dailyInfo.nameCn;
        } else {
            nameCn = '';
        }

        if (dailyInfo.nameEn) {
            nameEn = dailyInfo.nameEn;
        } else {
            nameEn = '';
        }

        let t;

        if (nameCn == '') {
            t = '【' + monthValue + '月' + dayOfMonth + '日' + '】' + '每日订阅情报-' + nameEn;
        } else {
            t = '【' + monthValue + '月' + dayOfMonth + '日' + '】' + '每日订阅情报-' + nameEn + '(' + nameCn + ')';
        }

        $("#titleView #titleBgView p").text(t);

        if (t.length < 35) {
            $('#titleView #titleBgView p').css({
                "line-height": "50px",
                "font-size": "16px",
                "color": "#ffffff",
                "letter-spacing": "-0.43px"
            })
        } else {
            $('#titleView #titleBgView p').css({
                "font-size": "16px",
                "color": "#FFFFFF",
                "letter-spacing": " -0.43px",
                "margin-top": "10px",
                "padding-left": "10px"
            })
        }
    }

    function coinBaseInfo(basicInfo) {
        $("#coinName").html(basicInfo.nameCn ? (basicInfo.nameEn + '\n' + basicInfo.nameCn) : basicInfo.nameEn);
        $("#priceCny").html('￥' + parseFloat(basicInfo.priceCny).toFixed(8));
        $("#priceUsd").html('$' + parseFloat(basicInfo.priceUsd).toFixed(8));

        if (basicInfo.change1h) {
            basicInfo.change1h = parseFloat(basicInfo.change1h);
            if (basicInfo.change1h < 0) {
                basicInfo.change1h = Math.abs(basicInfo.change1h);
                $("#oneHour").html('<span style="color: green">&darr;' + basicInfo.change1h + '%' + '</span>');
            } else {
                $("#oneHour").html('<span style="color: red">&uarr;' + basicInfo.change1h + '%' + '</span>');
            }
        } else {
            $("#oneHour").html('--');
        }

        if (basicInfo.change1d) {
            basicInfo.change1d = parseFloat(basicInfo.change1d);
            if (basicInfo.change1d < 0) {
                basicInfo.change1d = Math.abs(basicInfo.change1d);
                $("#oneDay").html('<span style="color: green">&darr;' + basicInfo.change1h + '%' + '</span>');
            } else {
                $("#oneDay").html('<span style="color: red">&uarr;' + basicInfo.change1h + '%' + '</span>');
            }
        } else {
            $("#oneDay").html('--');
        }

        if (basicInfo.change7d) {
            basicInfo.change7d = parseFloat(basicInfo.change7d);
            if (basicInfo.change7d < 0) {
                basicInfo.change7d = Math.abs(basicInfo.change7d);
                $("#oneWeek").html('<span style="color: green">&darr;' + basicInfo.change1h + '%' + '</span>');
            } else {
                $("#oneWeek").html('<span style="color: red">&uarr;' + basicInfo.change1h + '%' + '</span>');
            }
        } else {
            $("#oneWeek").html('--');
        }

        if (basicInfo.volume24h) {
            basicInfo.volume24h = parseFloat(basicInfo.volume24h);
            if (basicInfo.volume24h < 100000000) {
                basicInfo.volume24h = basicInfo.volume24h / 10000;
                basicInfo.volume24h = basicInfo.volume24h.toFixed(2);
                $("#oneDayTrade").html(basicInfo.volume24h + '万');
            } else {
                basicInfo.volume24h = basicInfo.volume24h / 100000000;
                basicInfo.volume24h = basicInfo.volume24h.toFixed(2);
                $("#oneDayTrade").html(basicInfo.volume24h + '亿');
            }
        } else {
            $("#oneDayTrade").html('--');
        }

        if (basicInfo.marketCap) {
            basicInfo.marketCap = parseFloat(basicInfo.marketCap);
            if (basicInfo.marketCap < 100000000) {
                basicInfo.marketCap = basicInfo.marketCap / 10000;
                basicInfo.marketCap = basicInfo.marketCap.toFixed(2);
                $("#marketVal").html(basicInfo.marketCap + '万');
            } else {
                basicInfo.marketCap = basicInfo.marketCap / 100000000;
                basicInfo.marketCap = basicInfo.marketCap.toFixed(2);
                $("#marketVal").html(basicInfo.marketCap + '亿');
            }
        } else {
            $("#marketVal").html('--');
        }

        if (basicInfo.availableSupply) {
            basicInfo.availableSupply = parseFloat(basicInfo.availableSupply);
            if (basicInfo.availableSupply < 100000000) {
                basicInfo.availableSupply = basicInfo.availableSupply / 10000;
                basicInfo.availableSupply = parseInt(basicInfo.availableSupply).toFixed(2);
                $("#curCoinVal").html(basicInfo.availableSupply + '万');
            } else {
                basicInfo.availableSupply = basicInfo.availableSupply / 100000000;
                basicInfo.availableSupply = parseInt(basicInfo.availableSupply).toFixed(2);
                $("#curCoinVal").html(basicInfo.availableSupply + '亿');
            }
        } else {
            $("#curCoinVal").html('--');
        }

        $("#totalCoinVal").html(basicInfo.totalSupply ? basicInfo.totalSupply : '--');
        $("#onelineDate").html(basicInfo.onlineTime ? basicInfo.onlineTime.slice(0, 10) : '--');

        $("#coinLogo").attr("src", basicInfo.logoUrl ? basicInfo.logoUrl : coinLogoPlaceholder);

        $("#coinRankNum").hide();
        $("#oneDayTradeChange").hide();
    }

    function drawTrendLine(lineChartVOList) {
        if (isAlreadySubscribe == true) {
            $("#row5").show();
            $("#row4").show();
            let prodictThing = lineChartVOList[lineChartVOList.length - 1];
            let upR = parseInt((parseFloat(prodictThing.prob).toFixed(2)) * 100);
            let downR = (100 - upR);

            $("#upRate").html("&uarr;" + upR + "%" + "涨");
            $("#downRate").html("&darr;" + downR + '%' + "跌");
            $("#upperLevel").html("压力位" + '' + parseFloat(prodictThing.uppderBoundMean).toFixed(2));
            $("#lowLevel").html("支撑位" + '' + parseFloat(prodictThing.lowerBoundMean).toFixed(2));
        }

        let dateSerial = [];
        let valueSerial = [];

        var valueSerialMin;
        var valueSerialMax;

        lineChartVOList.forEach(element => {
            valueSerial.push(parseFloat(element.yhat).toFixed(2));
    });

        for (let index = 0; index < lineChartVOList.length; index++) {
            if (index == 0) {
                let eleOne = lineChartVOList[index];
                let tempOne = new Date(eleOne.ds);
                dateSerial.push(date2String(tempOne, 'HM'));
            } else {
                let ele = lineChartVOList[index];
                let eleBefore = lineChartVOList[index - 1];

                let temp = new Date(ele.ds);
                let tempBefore = new Date(eleBefore.ds);

                if (temp.getFullYear() > tempBefore.getFullYear()) {
                    dateSerial.push(date2String(temp, 'YMD'));
                } else {
                    if (temp.getMonth() > tempBefore.getMonth()) {
                        dateSerial.push(date2String(temp, 'MD'));
                    } else {
                        if (temp.getDate() > tempBefore.getDate()) {
                            dateSerial.push(date2String(temp, 'MD'));
                        } else {
                            dateSerial.push(date2String(temp, 'HM'));
                        }
                    }
                }
            }
        }

        valueSerialMax = Math.max.apply(null, valueSerial).toFixed(6);
        valueSerialMin = Math.min.apply(null, valueSerial).toFixed(6);

        var myChart = echarts.init(document.getElementById('chartView'));

        option = {

            title: [{
                left: 'center',
                text: ''
            }],
            tooltip: {
                trigger: 'axis'
            },
            xAxis: [{
                type: 'category',
                data: dateSerial
            }],
            yAxis: [{
                offset: 0,
                splitLine: {
                    show: true,
                    lineStyle: {
                        type: 'dashed'
                    }
                },
                axisLine: {
                    show: false
                },
                axisLabel: {
                    margin: 2
                },
                axisTick: {
                    length: 0
                },
                min: valueSerialMin,
                max: valueSerialMax,
            }],
            grid: [{
                bottom: '10%',
                top: '10%'
            }],
            animation: false,
            series: [{
                type: 'line',
                showSymbol: true,
                smooth: true,
                data: valueSerial
            }]
        };

        myChart.setOption(option);
    }

    function drawPieView(lineChartVOList) {
        let prodictThing = lineChartVOList[0];
        let upR = parseFloat(prodictThing.prob);
        let downR = 1 - upR;

        var pieChart = echarts.init(document.getElementById('pieView'));

        option = {
            title: {
                text: '',
                subtext: '',
                x: 'center'
            },
            color: ['#FA6557', '#35CC62'],
            series: [{
                name: '',
                type: 'pie',
                radius: '100%',
                center: ['50%', '50%'],
                label: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: false
                    }
                },
                data: [{
                    value: upR,
                    name: ''
                },
                    {
                        value: downR,
                        name: ''
                    }
                ]
            }]
        };

        pieChart.setOption(option);
    }

    function drawSixIndexRadarView(radarMapVOList) {
        let ralationship = {
            "supply": 3,
            "need": 6,
            "prop": 5,
            "mood": 7,
            "safe": 4,
            "future": 8
        };

        let prefix = '（相比昨天涨跌率：{arrow}{rate}%）';
        let prefixNoPrecent = '（相比昨天涨跌率：{rate}）';

        let zongHeInfo = '';
        let rankInfo = '';
        let beatInfo = '';

        if (radarMapVOList[0].score) {
            zongHeInfo = radarMapVOList[0].score;
        } else {
            zongHeInfo = '';
        }

        if (radarMapVOList[1].score) {
            rankInfo = radarMapVOList[1].score;
        } else {
            rankInfo = '';
        }

        if (radarMapVOList[1].scoreChange && parseFloat(radarMapVOList[1].scoreChange) > 0) {
            rankInfo += "<span style='font-size: 10px;'>&uarr;" + Math.abs(radarMapVOList[1].scoreChange) +
                "</span>";
        }

        if (radarMapVOList[1].scoreChange && parseFloat(radarMapVOList[1].scoreChange) < 0) {
            rankInfo += "<span style='font-size: 10px;'>&darr;" + Math.abs(radarMapVOList[1].scoreChange) +
                "</span>";
        }

        if (radarMapVOList[2].score) {
            beatInfo = (parseFloat(radarMapVOList[2].score) * 100).toFixed(2);
        } else {
            beatInfo = '';
        }

        $("#sixIndexInfoView #indexInfoTitle #indexLeft .indexNum").text(zongHeInfo);
        $("#sixIndexInfoView #indexInfoTitle #indexMid .indexNum").html(rankInfo);
        $("#sixIndexInfoView #indexInfoTitle #indexRight .indexNum").text(beatInfo + '%');

        let supplyScoreChange;
        let needScoreChange;
        let propScoreChange;
        let safeScoreChange;
        let moodScoreChange;
        let futureScoreChange;

        if (radarMapVOList[ralationship.supply].scoreChange) {
            supplyScoreChange = parseFloat(radarMapVOList[ralationship.supply].scoreChange);
        } else {
            supplyScoreChange = 0;
        }

        if (radarMapVOList[ralationship.need].scoreChange) {
            needScoreChange = parseFloat(radarMapVOList[ralationship.need].scoreChange);
        } else {
            needScoreChange = 0;
        }

        if (radarMapVOList[ralationship.prop].scoreChange) {
            propScoreChange = parseFloat(radarMapVOList[ralationship.prop].scoreChange);
        } else {
            propScoreChange = 0;
        }

        if (radarMapVOList[ralationship.safe].scoreChange) {
            safeScoreChange = parseFloat(radarMapVOList[ralationship.safe].scoreChange);
        } else {
            safeScoreChange = 0;
        }

        if (radarMapVOList[ralationship.mood].scoreChange) {
            moodScoreChange = parseFloat(radarMapVOList[ralationship.mood].scoreChange);
        } else {
            moodScoreChange = 0;
        }

        if (radarMapVOList[ralationship.future].scoreChange) {
            futureScoreChange = parseFloat(radarMapVOList[ralationship.future].scoreChange);
        } else {
            futureScoreChange = 0;
        }

        if (isAlreadySubscribe == true) {
            if (supplyScoreChange > 0) {
                $("#supplyNum").css('color', '#FA6557');
                $("#supplyNum").html(prefix.replace('{rate}', Math.abs(supplyScoreChange)).replace('{arrow}',
                    '&uarr;'));
            } else if (supplyScoreChange < 0) {
                $("#supplyNum").css('color', '#35CC62');
                $("#supplyNum").html(prefix.replace('{rate}', Math.abs(supplyScoreChange)).replace('{arrow}',
                    '&darr;'));
            } else {
                $("#supplyNum").css('color', '#666666');
                $("#supplyNum").html(prefixNoPrecent.replace('{rate}', '-'));
            }

            if (needScoreChange > 0) {
                $("#needNum").css('color', '#FA6557');
                $("#needNum").html(prefix.replace('{rate}', Math.abs(needScoreChange)).replace('{arrow}', '&uarr;'));
            } else if (needScoreChange < 0) {
                $("#needNum").css('color', '#35CC62');
                $("#needNum").html(prefix.replace('{rate}', Math.abs(needScoreChange)).replace('{arrow}', '&darr;'));
            } else {
                $("#needNum").css('color', '#666666');
                $("#needNum").text(prefixNoPrecent.replace('{rate}', '-'));
            }

            if (propScoreChange > 0) {
                $("#propNum").css('color', '#FA6557');
                $("#propNum").html(prefix.replace('{rate}', Math.abs(propScoreChange)).replace('{arrow}', '&uarr;'));
            } else if (propScoreChange < 0) {
                $("#propNum").css('color', '#35CC62');
                $("#propNum").html(prefix.replace('{rate}', Math.abs(propScoreChange)).replace('{arrow}', '&darr;'));
            } else {
                $("#propNum").css('color', '#666666');
                $("#propNum").text(prefixNoPrecent.replace('{rate}', '-'));
            }

            if (safeScoreChange > 0) {
                $("#moodNum").css('color', '#FA6557');
                $("#moodNum").html(prefix.replace('{rate}', Math.abs(safeScoreChange)).replace('{arrow}', '&uarr;'));
            } else if (safeScoreChange < 0) {
                $("#moodNum").css('color', '#35CC62');
                $("#moodNum").html(prefix.replace('{rate}', Math.abs(safeScoreChange)).replace('{arrow}', '&darr;'));
            } else {
                $("#moodNum").css('color', '#666666');
                $("#moodNum").text(prefixNoPrecent.replace('{rate}', '-'));
            }

            if (moodScoreChange > 0) {
                $("#safeNum").css('color', '#FA6557');
                $("#safeNum").html(prefix.replace('{rate}', Math.abs(moodScoreChange)).replace('{arrow}', '&uarr;'));
            } else if (moodScoreChange < 0) {
                $("#safeNum").css('color', '#35CC62');
                $("#safeNum").html(prefix.replace('{rate}', Math.abs(moodScoreChange)).replace('{arrow}', '&darr;'));
            } else {
                $("#safeNum").css('color', '#666666');
                $("#safeNum").text(prefixNoPrecent.replace('{rate}', '-'));
            }

            if (futureScoreChange > 0) {
                $("#futureNum").css('color', '#FA6557');
                $("#futureNum").html(prefix.replace('{rate}', Math.abs(futureScoreChange)).replace('{arrow}',
                    '&uarr;'));
            } else if (futureScoreChange < 0) {
                $("#futureNum").css('color', '#35CC62');
                $("#futureNum").html(prefix.replace('{rate}', Math.abs(futureScoreChange)).replace('{arrow}',
                    '&darr;'));
            } else {
                $("#futureNum").css('color', '#666666');
                $("#futureNum").text(prefixNoPrecent.replace('{rate}', '-'));
            }
        }

        let radarData = [];
        for (let index = 0; index < radarMapVOList.length; index++) {
            if (index > 2) {
                const element = radarMapVOList[index];
                radarData.push(element.score);
            }
        }

        let index_3 = radarMapVOList[3].name + radarMapVOList[3].score;
        let index_4 = radarMapVOList[4].name + radarMapVOList[4].score;
        let index_5 = radarMapVOList[5].name + radarMapVOList[5].score;
        let index_6 = radarMapVOList[6].name + radarMapVOList[6].score;
        let index_7 = radarMapVOList[7].name + radarMapVOList[7].score;
        let index_8 = radarMapVOList[8].name + radarMapVOList[8].score;


        var radarChartView = echarts.init(document.getElementById('radarView'));

        this.option = {
            title: {},
            radar: {
                center: ['50%', '50%'],
                radius: 80,
                name: {
                    textStyle: {
                        color: '#fff',
                        backgroundColor: '#fff',
                        borderRadius: 3,
                        padding: [3, 5]
                    }
                },
                indicator: [{
                    name: index_3,
                    min: 0,
                    max: 1,
                    color: '#2A2A2A'
                },
                    {
                        name: index_4,
                        min: 0,
                        max: 1,
                        color: '#2A2A2A'
                    },
                    {
                        name: index_5,
                        min: 0,
                        max: 1,
                        color: '#2A2A2A'
                    },
                    {
                        name: index_6,
                        min: 0,
                        max: 1,
                        color: '#2A2A2A'
                    },
                    {
                        name: index_7,
                        min: 0,
                        max: 1,
                        color: '#2A2A2A'
                    },
                    {
                        name: index_8,
                        min: 0,
                        max: 1,
                        color: '#2A2A2A'
                    }
                ]
            },
            series: [{
                name: '',
                type: 'radar',
                areaStyle: {
                    normal: {
                        opacity: 0.8,
                        color: "#00a8a3"
                    }
                },
                data: [{
                    value: radarData,
                    name: ''
                }],
                label: {
                    formatter: {}
                }
            }]
        };
        radarChartView.setOption(option);
    }

    function drawTop5Star(todayRecommendVOList) {
        let todayDate = new Date();
        let todayDateString = date2String(todayDate, 'NOTHING');

        let coinUrl = pageBaseUrl.replace('{REPORT_DATE}', todayDateString);

        for (let index = 0; index < todayRecommendVOList.length; index++) {
            if (index == 0) {
                let model = todayRecommendVOList[0];
                $("#row1 .topCoinName").text(model.nameEn);
                $("#row1 .topCoinName").attr('href', coinUrl.replace('{BCC_ID}', model.bccId));

                for (let j = 0; j < parseInt(parseFloat(model.upRate) * 5); j++) {
                    var star = $("#starTemplete img").clone();
                    $("#row1 .starView").append(star);
                }
            } else if (index == 1) {
                let model = todayRecommendVOList[1];
                $("#row2 .topCoinName").text(model.nameEn);
                $("#row2 .topCoinName").attr('href', coinUrl.replace('{BCC_ID}', model.bccId));

                for (let j = 0; j < parseInt(parseFloat(model.upRate) * 5); j++) {
                    var star = $("#starTemplete img").clone();
                    $("#row2 .starView").append(star);
                }

            } else if (index == 2) {
                let model = todayRecommendVOList[2];
                $("#row3 .topCoinName").text(model.nameEn);
                $("#row3 .topCoinName").attr('href', coinUrl.replace('{BCC_ID}', model.bccId));

                for (let j = 0; j < parseInt(parseFloat(model.upRate) * 5); j++) {
                    var star = $("#starTemplete img").clone();
                    $("#row3 .starView").append(star);
                }

            } else if (index == 3) {
                let model = todayRecommendVOList[3];
                $("#row4 .topCoinName").text(model.nameEn);
                $("#row4 .topCoinName").attr('href', coinUrl.replace('{BCC_ID}', model.bccId));

                for (let j = 0; j < parseInt(parseFloat(model.upRate) * 5); j++) {
                    var star = $("#starTemplete img").clone();
                    $("#row4 .starView").append(star);
                }
            } else {
                let model = todayRecommendVOList[4];
                $("#row5 .topCoinName").text(model.nameEn);
                $("#row5 .topCoinName").attr('href', coinUrl.replace('{BCC_ID}', model.bccId));

                for (let j = 0; j < parseInt(parseFloat(model.upRate) * 5); j++) {
                    var star = $("#starTemplete img").clone();
                    $("#row5 .starView").append(star);
                }
            }
        }

        if (isAlreadySubscribe == false) {
            $("#row5").hide();
            $("#row4").hide();
        }

        if (isAlreadySubscribe == false) {
            $("#moreCoinBtn").show();
        } else {
            $("#moreCoinBtn").hide();
        }
    }

    function newsInfo(newsData) {
        for (var index = 0; index < newsData.length; index++) {
            (function (index_i) {
                var element = newsData[index_i];

                var thumbnail;
                if (element.thumbnail == null || $.trim(element.thumbnail) == '') {
                    thumbnail = '';
                } else {
                    thumbnail = element.thumbnail;
                }

                var newsTitle;
                if (element.title == null || $.trim(element.title) == '') {
                    newsTitle = '';
                } else {
                    newsTitle = element.title;
                }

                var newsHref;
                if (element.newsUrl == null || $.trim(element.newsUrl) == '') {
                    newsHref = '';
                } else {
                    newsHref = element.newsUrl;
                }

                var newsContent;
                if (element.description == null || $.trim(element.description) == '') {
                    newsContent = '';
                } else {
                    newsContent = element.description;
                }

                var optiNum;
                if (element.bullCount == null || $.trim(element.bullCount) == '') {
                    optiNum = '';
                } else {
                    optiNum = element.bullCount;
                }

                var pessiNum;
                if (element.bearCount == null || $.trim(element.bearCount) == '') {
                    pessiNum = '';
                } else {
                    pessiNum = element.bearCount;
                }

                var cell = $("#newsTemplete .newsCell").clone().appendTo($("#newsInfoView"));
                cell.find(".newsImg").attr("src", thumbnail);
                cell.find(".newsTitle").attr("href", newsHref);
                cell.find(".newsTitle").text(newsTitle);
                cell.find(".newsContent").text(newsContent);

                cell.find(".optiNum").text(optiNum);
                cell.find(".pessiNum").text(pessiNum);

                if (parseInt(optiNum) > parseInt(pessiNum)) {
                    cell.find(".newsDisadvantage").css("display", "none");
                } else if (parseInt(optiNum) < parseInt(pessiNum)) {
                    cell.find(".newsAdvantage").css("display", "none");
                } else {
                    cell.find(".newsAdvantage").css("display", "none");
                    cell.find(".newsDisadvantage").css("display", "none");
                }
            })(index);
        }

        if (isAlreadySubscribe == false) {
            $("#newsTemplete #moreNewsBtn").clone().appendTo($("#newsInfoView"));
        }
    }

    function renderQrCode(reportLinkUrl) {
        $("#qrcodeView").attr("src", reportLinkUrl);
    }

    if (coinWholeData.data) {
        if (coinWholeData.data.dailyInfo) {
            reportTitleInfo(coinWholeData.data.dailyInfo);
        }

        if (coinWholeData.data.basicInfo) {
            coinBaseInfo(coinWholeData.data.basicInfo);
        }

        if (coinWholeData.data.lineChartVOList) {
            drawTrendLine(coinWholeData.data.lineChartVOList);
        }

        if (coinWholeData.data.lineChartVOList) {
            drawPieView(coinWholeData.data.lineChartVOList);
        }

        if (coinWholeData.data.radarMapVOList) {
            drawSixIndexRadarView(coinWholeData.data.radarMapVOList);
        }

        if (coinWholeData.data.todayRecommendVOList) {
            drawTop5Star(coinWholeData.data.todayRecommendVOList);
        }

        if (coinWholeData.data.bccNewsList) {
            newsInfo(coinWholeData.data.bccNewsList);
        }

        if (coinWholeData.data.qrcodeinfo.url) {
            renderQrCode(coinWholeData.data.qrcodeinfo.url);
        }
    }
</script>

</body>

<style>
    html,
    body,
    div,
    span,
    applet,
    object,
    iframe,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    blockquote,
    pre,
    a,
    abbr,
    acronym,
    address,
    big,
    cite,
    code,
    del,
    dfn,
    em,
    img,
    ins,
    kbd,
    q,
    s,
    samp,
    small,
    strike,
    strong,
    sub,
    sup,
    tt,
    var,
    b,
    u,
    i,
    center,
    dl,
    dt,
    dd,
    ol,
    ul,
    li,
    fieldset,
    form,
    label,
    legend,
    table,
    caption,
    tbody,
    tfoot,
    thead,
    tr,
    th,
    td,
    article,
    aside,
    canvas,
    details,
    embed,
    figure,
    figcaption,
    footer,
    header,
    hgroup,
    menu,
    nav,
    output,
    ruby,
    section,
    summary,
    time,
    mark,
    audio,
    video {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 100%;
        font: inherit;
        vertical-align: baseline;
    }

    /* HTML5 display-role reset for older browsers */

    article,
    aside,
    details,
    figcaption,
    figure,
    footer,
    header,
    hgroup,
    menu,
    nav,
    section {
        display: block;
    }

    body {
        line-height: 1;
    }

    ol,
    ul {
        list-style: none;
    }

    blockquote,
    q {
        quotes: none;
    }

    blockquote:before,
    blockquote:after,
    q:before,
    q:after {
        content: '';
        content: none;
    }

    table {
        border-collapse: collapse;
        border-spacing: 0;
    }
</style>

<style>
    /* commment style */

    .yahei {
        font-family: PingFangSC-Medium, "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu;
        font-size: 12px;
        line-height: 150%;
    }

    .box {
        display: -webkit-box;
    }

    .box_justify {
        display: -webkit-box;
        text-align: justify;
    }

    .font_9 {
        font-size: 9px;
    }

    .font_14 {
        font-size: 14px;
    }

    .font_16 {
        font-size: 16px;
    }

    .font_18 {
        font-size: 18px;
    }

    .font_20 {
        font-size: 20px;
    }

    .font_22 {
        font-size: 22px;
    }

    .font_26 {
        font-size: 26px;
    }

    .theme_color {
        color: rgb(20, 154, 150);
    }

    .white {
        color: white;
    }

    .white_b {
        background-color: white;
    }

    .theme_bg_color {
        background-color: #339cb8;
    }

    .gradient {
        background: -webkit-gradient(linear, 0 0, right 0, from(#339cb8), to(#3dc8b6));
    }

    .center {
        text-align: center;
    }

    .w_30 {
        width: 33%;
    }

    .w_20 {
        width: 20%;
    }

    .w_80 {
        width: 80%;
    }

    .p_t_10 {
        padding-top: 10px;
    }

    .p_b_10 {
        padding-bottom: 10px;
    }

    .p_l_10 {
        padding-left: 10px;
    }

    .p_r_10 {
        padding-right: 10px;
    }

    .p_10 {
        padding: 10px;
    }

    .border_r {
        border-right: 1px solid white;
    }

    .center_95 {
        margin: 0 auto;
        width: 95%;
    }

    .center_100 {
        margin: 0 auto;
        width: 100%;
    }

    .line_h_35 {
        line-height: 2.1875rem;
    }

    body {
        background-color: rgb(250, 250, 250);
    }
</style>

<style>
    /* titleView style */

    #titleBgView {
        background: rgba(0, 0, 0, 0.50);
        left: 0px;
        right: 0px;
        bottom: 50px;
        width: 100%;
        height: 50px;
    }
</style>

<style>
    /* baseInfoView style */

    #baseInfoView #baseInfoTitle {
        height: 3.75rem;
    }

    #coinLogo {
        display: inline;
        width: 1.875rem;
        height: 1.875rem;
        margin-left: 1.25rem;
        margin-top: .9375rem;
    }

    #coinName {
        display: inline-block;
        font-size: 16px;
        color: #FFFFFF;
        letter-spacing: -0.43px;
        height: 1.5625rem;
        margin-left: .625rem;
        margin-top: 1.0625rem;
    }

    #coinPrice {
        float: right;
        margin-top: .625rem;
        margin-right: 1.5625rem;
    }

    #priceCny {
        margin-right: -16px;
        font-size: 16px;
        color: #FFFFFF;
        letter-spacing: -0.43px;
        text-align: right;
        margin-top: 7px;
    }

    #priceUsd {
        margin-top: .1875rem;
        font-size: 12px;
        color: #FFFFFF;
        letter-spacing: -0.29px;
        text-align: right;
    }

    #baseInfoContent {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
        background: #FFFFFF;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }

    #baseLeft {
        width: 20%;
        border-right: 1px solid #E6E6E6;
        text-align: center;
    }

    #baseMid {
        width: 40%;
        border-right: 1px solid #E6E6E6;
        text-align: center;
    }

    #baseRight {
        width: 40%;
        text-align: center;
    }

    .baseTip {
        font-size: 11px;
        color: #999999;
        letter-spacing: -0.29px;
        text-align: center;
    }

    .baseNum {
        font-size: 12px;
        color: #151515;
        letter-spacing: -0.29px;
        line-height: 13px;
        text-align: center;
    }

    #coinRankNum {
        background: #00A8A3;
        border-radius: 6px;
        font-size: 10px;
        color: #FFFFFF;
        letter-spacing: -0.19px;
        text-align: center;
        padding-left: .125rem;
        padding-right: .125rem;
    }
</style>

<style>
    /* trendInfoView style */

    #trendInfoTitle {
        height: 3.75rem;
    }

    #trendLeft {
        width: 20%;
    }

    #pieView {
        border: 2px solid #FFFFFF;
        border-radius: 1.0625rem;
        margin-left: 1.125rem;
        margin-top: .8125rem;
    }

    #trendMid {
        width: 40%;
    }

    #trendRight {
        width: 40%;
    }

    .trendNum {
        font-size: 14px;
        color: #FFFFFF;
        letter-spacing: 0.92px;
        margin-top: .5625rem;
    }

    #trendInfoContent {
        background: #FFFFFF;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }

    #indexDescView {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .row {
        background-color: #FFFFFF;
        height: 4.6875rem;
        border-bottom: 1px solid #E6E6E6;
    }

    .indexDescTitle {
        font-size: 12px;
        color: #333333;
        line-height: 21px;
        margin-top: .625rem;
    }

    .indexDescChange {
        font-size: 12px;
        color: #FA6557;
        margin-top: .625rem;
    }

    .indexDesc {
        font-size: 12px;
        color: rgba(0, 0, 0, 0.65);
        margin-top: .3125rem;
    }
</style>

<style>
    /* sixIndexInfoView style */

    #indexInfoTitle {
        height: 3.75rem;
    }

    #indexLeft {
        width: 33%;
        padding-top: .5625rem;
    }

    #indexMid {
        width: 33%;
        padding-top: .5625rem;
    }

    #indexRight {
        width: 33%;
        padding-top: .5625rem;
    }

    .indexTitle {
        font-size: 12px;
        color: #FFFFFF;
        letter-spacing: -0.43px;
        text-align: center;
    }

    .indexNum {
        font-size: 18px;
        color: #FFFFFF;
        letter-spacing: -0.43px;
        line-height: 17px;
        text-align: center;
    }

    #indexInfoContent {
        background: #FFFFFF;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }
</style>

<style>
    /* newsInfoView style */

    #newsInfoView {
        padding-bottom: .625rem;
        background: #FFFFFF;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }

    .newsAdvantage {
        color: white;
        background: #FA6557;
        border-radius: 6px;
        padding-left: .125rem;
        padding-right: .125rem;
    }

    .newsDisadvantage {
        color: white;
        background: #35CC62;
        border-radius: 6px;
        padding-left: .125rem;
        padding-right: .125rem;
    }

    .optiTitle {
        color: #FA6557;
    }

    .optiNum {
        color: #FA6557;
    }

    .pessiTitle {
        color: #35CC62;
    }

    .pessiNum {
        color: #35CC62;
    }

    .optiView {
        float: left;
    }

    .pessiView {
        float: right;
    }

    #moreNewsBtn {
        border: 1px solid #00A8A3;
        border-radius: 4px;
        margin: 0 auto;
        margin-top: .9375rem;
        width: 10rem;
        height: 2.25rem;
        font-size: 12px;
        color: #00A8A3;
        letter-spacing: 1px;
        text-align: center;
        line-height: 36px;
    }
</style>

<style>
    /* topInfoView style */

    #top5InfoView {
        background: #FFFFFF;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
        border-radius: 2px;
        margin-left: .625rem;
        margin-right: .625rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        padding-bottom: .625rem;
    }

    .top5Row {
        height: 3.4375rem;
        background-color: #FFFFFF;
        border-bottom: 1px solid #E6E6E6;
    }

    .top5RankIcon {
        margin-top: 1.25rem;
    }

    .top5RankNum {
        margin-top: 1.25rem;
        font-size: 18px;
        color: #333333;
        letter-spacing: -0.43px;
        text-align: center;
    }

    .topCoinName {
        margin-top: 1.25rem;
        margin-left: 1.25rem;
        font-size: 18px;
        color: #333333;
        letter-spacing: -0.43px;
        text-align: center;
    }

    .starView {
        float: right;
        margin-top: 1.25rem;
        margin-left: .625rem;
    }

    #moreCoinBtn {
        border: 1px solid #00A8A3;
        border-radius: 4px;
        margin: 0 auto;
        margin-top: .9375rem;
        width: 10rem;
        height: 2.25rem;
        font-size: 12px;
        color: #00A8A3;
        letter-spacing: 1px;
        text-align: center;
        line-height: 36px;
    }
</style>

<style>
    /* purchaseEntranceView style */

    #qrcodeView {
        display: block;
        width: 6.25rem;
        height: 6.25rem;
        float: left;
        position: relative;
        bottom: 122px;
        left: 15px;
    }
</style>

</html>
